home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / texteditor_gc.doc < prev    next >
Encoding:
Text File  |  1999-11-02  |  26.2 KB  |  849 lines

  1. TABLE OF CONTENTS
  2.  
  3. texteditor.gadget/texteditor.gadget
  4. texteditor.gadget/GA_TEXTEDITOR_AreaMarked
  5. texteditor.gadget/GA_TEXTEDITOR_ColorMap
  6. texteditor.gadget/GA_TEXTEDITOR_Contents
  7. texteditor.gadget/GA_TEXTEDITOR_CursorX
  8. texteditor.gadget/GA_TEXTEDITOR_CursorY
  9. texteditor.gadget/GA_TEXTEDITOR_DoubleClickHook
  10. texteditor.gadget/GA_TEXTEDITOR_ExportHook
  11. texteditor.gadget/GA_TEXTEDITOR_ExportWrap
  12. texteditor.gadget/GA_TEXTEDITOR_FixedFont
  13. texteditor.gadget/GA_TEXTEDITOR_Flow
  14. texteditor.gadget/GA_TEXTEDITOR_HasChanged
  15. texteditor.gadget/GA_TEXTEDITOR_ImportHook
  16. texteditor.gadget/GA_TEXTEDITOR_ImportWrap
  17. texteditor.gadget/GA_TEXTEDITOR_InsertMode         (not yet implemented...)
  18. texteditor.gadget/GA_TEXTEDITOR_InVirtualGroup
  19. texteditor.gadget/GA_TEXTEDITOR_Pen
  20. texteditor.gadget/GA_TEXTEDITOR_Prop_DeltaFactor
  21. texteditor.gadget/GA_TEXTEDITOR_Prop_Entries
  22. texteditor.gadget/GA_TEXTEDITOR_Prop_First
  23. texteditor.gadget/GA_TEXTEDITOR_Prop_Visible
  24. texteditor.gadget/GA_TEXTEDITOR_Quiet
  25. texteditor.gadget/GA_TEXTEDITOR_ReadOnly
  26. texteditor.gadget/GA_TEXTEDITOR_RedoAvailable
  27. texteditor.gadget/GA_TEXTEDITOR_Separator
  28. texteditor.gadget/GA_TEXTEDITOR_Slider
  29. texteditor.gadget/GA_TEXTEDITOR_StyleBold
  30. texteditor.gadget/GA_TEXTEDITOR_StyleItalic
  31. texteditor.gadget/GA_TEXTEDITOR_StyleUnderline
  32. texteditor.gadget/GA_TEXTEDITOR_TypeAndSpell
  33. texteditor.gadget/GA_TEXTEDITOR_UndoAvailable
  34. texteditor.gadget/GA_TEXTEDITOR_WrapBorder
  35. texteditor.gadget/GM_TEXTEDITOR_ARexxCmd
  36. texteditor.gadget/GM_TEXTEDITOR_ClearText
  37. texteditor.gadget/GM_TEXTEDITOR_ExportBlock        (not yet implemented...)
  38. texteditor.gadget/GM_TEXTEDITOR_ExportText
  39. texteditor.gadget/GM_TEXTEDITOR_HandleError
  40. texteditor.gadget/GM_TEXTEDITOR_InsertText
  41. texteditor.gadget/GM_TEXTEDITOR_MacroBegin         (not yet implemented...)
  42. texteditor.gadget/GM_TEXTEDITOR_MacroEnd           (not yet implemented...)
  43. texteditor.gadget/GM_TEXTEDITOR_MacroExecute       (not yet implemented...)
  44. texteditor.gadget/GM_TEXTEDITOR_MarkText
  45. texteditor.gadget/GM_TEXTEDITOR_Search
  46. texteditor.gadget/texteditor.gadget
  47.  
  48. texteditor.gadget is a fast multiline stringgadget. It can hold quite large texts
  49. without noticeable slowdowns. It supports the clipboard, it can show text with
  50. different styles, alignments and colors. It can hold separators, it has
  51. multilevel undo/redo and it can easily be configured to use an external spell
  52. checker for type'n'spell and word guessing.
  53.  
  54. texteditor.gadget/GA_TEXTEDITOR_AreaMarked
  55.  
  56.     NAME
  57.         GA_TEXTEDITOR_AreaMarked -- [..G], BOOL
  58.  
  59.     FUNCTION
  60.         This tag will be set to TRUE when text is marked. And back to
  61.         FALSE when nothing is marked.
  62.         You can create a notifyevent with this tag and let your cut/copy
  63.         buttons become ghosted when nothing is marked.
  64.  
  65. texteditor.gadget/GA_TEXTEDITOR_ColorMap
  66.  
  67.     NAME
  68.         GA_TEXTEDITOR_ColorMap -- [IS.], LONG *
  69.  
  70.     FUNCTION
  71.         This is a map of allocated colors, which corresponds to the pen number
  72.         you set with GA_TEXTEDITOR_Pen.
  73.         By default the map looks like this:
  74.  
  75.            0 = Normal (user configured text/highlight color)
  76.            1 = Shine
  77.            2 = Halfshine
  78.            3 = Background
  79.            4 = Halfshadow
  80.            5 = Shadow
  81.            6 = Text
  82.            7 = Fill
  83.            8 = Mark
  84.            9 = Screen pen 0
  85.           10 = Screen pen 1
  86.           11 = Screen pen 3
  87.           .. = ...
  88.          255 = Screen pen 246
  89.  
  90.         If you supply your own colormap, then pen value 0 will still be
  91.         "Normal", i.e. the first entry in your colormap has pen value 1.
  92.         This may seem a bit illogical, suggest an alternative if you want!
  93.  
  94.         You are allowed to dynamically change the colormap. However if you
  95.         change an entry which is on-screen, then it won't have any immediate
  96.         effect. The idea is that you should e.g. supply a colormap with 16
  97.         unused LONGs, allow the user to select a custom color, allocate that
  98.         color and store the screen pen value into the colormap. Now you can
  99.         use that entry as argument to GA_TEXTEDITOR_Pen.
  100.  
  101.         Have in mind that your application may change screen, so the best
  102.         place to allocate/free colors are in the MUIM_Show and MUIM_Hide
  103.         methods of the editorgadget. An example of this can be found in
  104.         TextEditor-Demo.c
  105.  
  106.     SEE ALSO
  107.         GA_TEXTEDITOR_Pen
  108.  
  109. texteditor.gadget/GA_TEXTEDITOR_Contents
  110.  
  111.     NAME
  112.         GA_TEXTEDITOR_Contents -- [IS.], APTR
  113.  
  114.     FUNCTION
  115.         Set the contents of this gadget. This should normally be a pointer to
  116.         a text buffer, but if you have supplied your own importhook, then you
  117.         can set this to anything you like, e.g. a filehandle.
  118.  
  119.     SEE ALSO
  120.         GA_TEXTEDITOR_ImportHook, GM_TEXTEDITOR_InsertText
  121.  
  122. texteditor.gadget/GA_TEXTEDITOR_CursorX
  123.  
  124.     NAME
  125.         GA_TEXTEDITOR_CursorX -- [ISG], ULONG
  126.  
  127.     FUNCTION
  128.         You can get or set the cursors x position with this tag.
  129.         The first character on a line has position 0.
  130.         The position is not affected by the gadgets `autowrap' feature.
  131.         If you set a value higher than the length of the current line, then
  132.         it will automatically be truncated.
  133.  
  134.     SEE ALSO
  135.         GA_TEXTEDITOR_CursorY
  136.  
  137. texteditor.gadget/GA_TEXTEDITOR_CursorY
  138.  
  139.     NAME
  140.         GA_TEXTEDITOR_CursorY -- [ISG], ULONG
  141.  
  142.     FUNCTION
  143.         You can get or set the cursors y position with this tag.
  144.         The first line has position 0.
  145.         The position is not affected by the gadgets `autowrap' feature.
  146.         If you set a value higher than the number of lines, then it will
  147.         automatically be truncated.
  148.  
  149.     SEE ALSO
  150.         GA_TEXTEDITOR_CursorX
  151.  
  152. texteditor.gadget/GA_TEXTEDITOR_DoubleClickHook
  153.  
  154.     NAME
  155.         GA_TEXTEDITOR_DoubleClickHook -- [IS.], struct Hook *
  156.  
  157.     FUNCTION
  158.         If you use the gadget in ReadOnly mode then you may want a special
  159.         action to take place when the user doubleclick certain words.
  160.         For example a mail or news client, using this gadget to show mails,
  161.         may want the user to be able to click on URL's to lookup the link.
  162.  
  163.         The hook will be called with A1 pointing to a ClickMessage, and A0
  164.         will point to the hook itself.
  165.         Your hook should return TRUE if it wants to stop the editor from
  166.         blocking.
  167.  
  168.     EXAMPLE
  169.         /* This hook will test if the user doubleclicked an http address */
  170.  
  171.         BOOL URLHookCode (register __a1 struct ClickMessage *clickmsg)
  172.         {
  173.               UWORD pos = clickmsg->ClickPosition;
  174.  
  175.            while(pos && *(clickmsg->LineContents+pos-1) != ' ' && *(clickmsg->LineContents+pos-1) != '<')
  176.            {
  177.               pos--;
  178.            }
  179.  
  180.            if(strncmp(clickmsg->LineContents+pos, "http:", 5))
  181.            {
  182.               return(FALSE);
  183.            }
  184.            LookupURL(clickmsg->LineContents+pos);
  185.            return(TRUE);
  186.         }
  187.  
  188.     SEE ALSO
  189.         GA_TEXTEDITOR_ReadOnly, mui/TextEditor_mcc.h
  190.  
  191. texteditor.gadget/GA_TEXTEDITOR_ExportHook
  192.  
  193.     NAME
  194.         GA_TEXTEDITOR_ExportHook -- [IS.], struct Hook *
  195.  
  196.     SPECIAL INPUTS
  197.         GV_TEXTEDITOR_ExportHook_EMail
  198.         GV_TEXTEDITOR_ExportHook_Plain (default)
  199.  
  200.     FUNCTION
  201.         The EMail export hook will convert a bold word to *bold*, italic
  202.         words to /italic/ and underlined words to _underline_.
  203.         It also export separators such as <sb> or <tsb>.
  204.  
  205.         See GA_TEXTEDITOR_ImportHook for more documentation.
  206.  
  207.     SEE ALSO
  208.         GA_TEXTEDITOR_ExportWrap, GA_TEXTEDITOR_ImportHook
  209.         GM_TEXTEDITOR_ExportText
  210.  
  211. texteditor.gadget/GA_TEXTEDITOR_ExportWrap
  212.  
  213.     NAME
  214.         GA_TEXTEDITOR_ExportWrap -- [ISG], ULONG
  215.  
  216.     FUNCTION
  217.         This attribute allows the builtin export hooks to perform wordwrap.
  218.         Zero means no wrap (default).
  219.  
  220.     SEE ALSO
  221.         GA_TEXTEDITOR_ExportHook, GA_TEXTEDITOR_WrapBorder
  222.  
  223. texteditor.gadget/GA_TEXTEDITOR_FixedFont
  224.  
  225.     NAME
  226.         GA_TEXTEDITOR_FixedFont -- [I.G], BOOL
  227.  
  228.     FUNCTION
  229.         This attribute is not supported by the Reaction version of texteditor.gadget.
  230.         Use GA_TextAttr to set a fixed font.
  231.  
  232. texteditor.gadget/GA_TEXTEDITOR_Flow
  233.  
  234.     NAME
  235.         GA_TEXTEDITOR_Flow -- [.SG], UWORD
  236.  
  237.     SPECIAL INPUTS
  238.         GV_TEXTEDITOR_Flow_Left
  239.         GV_TEXTEDITOR_Flow_Right
  240.         GV_TEXTEDITOR_Flow_Center
  241.         GV_TEXTEDITOR_Flow_Justified (not yet implemented)
  242.  
  243.     FUNCTION
  244.         Set/get the current paragraphs alignment.
  245.         If an area is marked while you set this attribute, then the new
  246.         alignment will be set for the complete area.
  247.  
  248. texteditor.gadget/GA_TEXTEDITOR_HasChanged
  249.  
  250.     NAME
  251.         GA_TEXTEDITOR_HasChanged -- [ISG], BOOL
  252.  
  253.     FUNCTION
  254.         This tag will show if the contents of the gadget has changed.
  255.         You can take notify on this tag, so that you can connect it with a
  256.         checkmark or textobject.
  257.         You should set this tag to FALSE whenever you export the contents of
  258.         the gadget or overwrite it with something new.
  259.  
  260.         Even though you have set up notification on this tag you should
  261.         still get() it before you kill the text, because this makes it
  262.         possible to do some advanced testing to see if the text has actually
  263.         been modified. E.g. by checking the undobuffer, comparing checksums
  264.         or by checking whether or not the textbuffer is empty (none of this
  265.         is currently done, but it may be in the future).
  266.  
  267.         The tag is currently not affected by:
  268.          GA_TEXTEDITOR_Contents, GM_TEXTEDITOR_ClearText
  269.          GM_TEXTEDITOR_Export, GM_TEXTEDITOR_Import
  270.  
  271. texteditor.gadget/GA_TEXTEDITOR_ImportHook
  272.  
  273.     NAME
  274.         GA_TEXTEDITOR_ImportHook -- [IS.], struct Hook *
  275.  
  276.     SPECIAL INPUTS
  277.         GV_TEXTEDITOR_ImportHook_EMail
  278.         GV_TEXTEDITOR_ImportHook_MIME
  279.         GV_TEXTEDITOR_ImportHook_MIMEQuoted
  280.         GV_TEXTEDITOR_ImportHook_Plain (default)
  281.  
  282.     FUNCTION
  283.         Since this gadget allows different text styles, you can supply an
  284.         importhook to parse the text correctly.
  285.  
  286.         The default importhook understands the following escape sequences:
  287.  
  288.          <ESC> + u      Set the soft style to underline.
  289.          <ESC> + b      Set the soft style to bold.
  290.          <ESC> + i      Set the soft style to italic.
  291.          <ESC> + n      Set the soft style back to normal.
  292.          <ESC> + h      Highlight the current line.
  293.          <ESC> + p[x]   Change to color x, where x is taken from the colormap.
  294.                         0 means normal. The color is reset for each new line.
  295.  
  296.              The following sequences are only valid at the beginning of a line.
  297.  
  298.          <ESC> + l      Left justify current and following lines.
  299.          <ESC> + r      Right justify current and following lines.
  300.          <ESC> + c      Center current and following lines.
  301.          <ESC> + [s:x]  Create a separator. x is a bit combination of flags:
  302.                          Placement (mutually exclusive):
  303.                            1 = Top
  304.                            2 = Middle
  305.                            4 = Bottom
  306.                          Cosmetical:
  307.                            8 = StrikeThru   - Draw separator ontop of text.
  308.                           16 = Thick        - Make separator extra thick.
  309.  
  310.  
  311.           GV_TEXTEDITOR_ImportHook_MIME:
  312.  
  313.         This builtin hook will convert quoted-printables (e.g. "=E5") to the
  314.         ASCII representation, and merge lines ending with a "=", it will
  315.         wordwrap the text (using the value set with
  316.         GA_TEXTEDITOR_ImportWrap), it will highlight all lines which start
  317.         with ">" it will make real *bold*, /italic/, _underline_ and
  318.         #colored#, and it will replace <sb> or <tsb> with a real separator
  319.         bar. It stops parsing when it reaches a NULL byte.
  320.  
  321.         The color used for #colored# text is colormap entry 6, which defaults
  322.         to MPEN_FILL. To override it, just supply a colormap with entry 6 set
  323.         to whatever color you would like.
  324.  
  325.  
  326.           GV_TEXTEDITOR_ImportHook_MIMEQuoted:
  327.  
  328.         Like the MIME importhook, but each line gets quoted and highlighted.
  329.  
  330.  
  331.           GV_TEXTEDITOR_ImportHook_EMail:
  332.  
  333.         Like the MIME importhook, but it doesn't convert quoted printables.
  334.  
  335.  
  336.         You can of course create your own importhook, there is an external
  337.         file which describes the procedure.
  338.  
  339.     NOTE
  340.         Don't use custom hooks yet.
  341.  
  342.     SEE ALSO
  343.         GA_TEXTEDITOR_ColorMap, GA_TEXTEDITOR_ExportHook
  344.         GA_TEXTEDITOR_ImportWrap
  345.  
  346. texteditor.gadget/GA_TEXTEDITOR_ImportWrap
  347.  
  348.     NAME
  349.         GA_TEXTEDITOR_ImportWrap -- [ISG], ULONG
  350.  
  351.     FUNCTION
  352.         This is here to allow the builtin import hooks to perform wordwrap.
  353.         The builtin hooks accepts a value between 4 and 1024. Defaults to 1023.
  354.  
  355.     SEE ALSO
  356.         GA_TEXTEDITOR_ImportHook, GA_TEXTEDITOR_WrapBorder
  357.  
  358. texteditor.gadget/GA_TEXTEDITOR_InsertMode
  359.  
  360.     NAME
  361.         GA_TEXTEDITOR_InsertMode -- [ISG], BOOL
  362.  
  363.     FUNCTION
  364.         Not yet implemented...
  365.  
  366. texteditor.gadget/GA_TEXTEDITOR_InVirtualGroup
  367.  
  368.     NAME
  369.         GA_TEXTEDITOR_InVirtualGroup -- [I..], BOOL
  370.  
  371.     FUNCTION
  372.         Set this to TRUE when the gadget is inside a virtualgroup.
  373.         The reason is cosmetical. The pattern will be relative to the gadget
  374.         instead of the window, since the gadget can be "moved" around.
  375.  
  376. texteditor.gadget/GA_TEXTEDITOR_Pen
  377.  
  378.     NAME
  379.         GA_TEXTEDITOR_Pen -- [.SG], UBYTE (do you need UWORD or ULONG?)
  380.  
  381.     FUNCTION
  382.         The value of this tag reflects the current render pen.
  383.  
  384.     SEE ALSO
  385.         GA_TEXTEDITOR_ColorMap
  386.  
  387. texteditor.gadget/GA_TEXTEDITOR_Prop_DeltaFactor
  388.  
  389.     NAME
  390.         GA_TEXTEDITOR_Prop_DeltaFactor -- [..G], ULONG (OBSOLETE)
  391.  
  392.  
  393.     FUNCTION
  394.         This tag can tell you how high a line is. This is useful when you set
  395.         the increment value of a slider, as GA_TEXTEDITOR_Prop_Entries holds
  396.         the lines in pixels.
  397.  
  398.     SEE ALSO
  399.         GA_TEXTEDITOR_Prop_Visible
  400.         GA_TEXTEDITOR_Prop_First, GA_TEXTEDITOR_Prop_Entries
  401.  
  402. texteditor.gadget/GA_TEXTEDITOR_Prop_Entries
  403.  
  404.     NAME
  405.         GA_TEXTEDITOR_Prop_Entries -- [..G], ULONG (OBSOLETE)
  406.  
  407.  
  408.     FUNCTION
  409.         This value is the total number of lines in the editor.
  410.         If you want a slider attached to the gadget you should create a
  411.         notify on this attribute.
  412.  
  413.     SEE ALSO
  414.         GA_TEXTEDITOR_Prop_Visible
  415.         GA_TEXTEDITOR_Prop_First, GA_TEXTEDITOR_Prop_DeltaFactor
  416.  
  417. texteditor.gadget/GA_TEXTEDITOR_Prop_First
  418.  
  419.     NAME
  420.         GA_TEXTEDITOR_Prop_First -- [.SG], ULONG (OBSOLETE)
  421.  
  422.     FUNCTION
  423.         Get or set the first displayed line.
  424.         The purpose of this attribute is to allow connection between the
  425.         editorgadget and a scrollbar.
  426.  
  427.     SEE ALSO
  428.         GA_TEXTEDITOR_Prop_Visible
  429.         GA_TEXTEDITOR_Prop_Entries, GA_TEXTEDITOR_Prop_DeltaFactor
  430.  
  431. texteditor.gadget/GA_TEXTEDITOR_Prop_Visible
  432.  
  433.     NAME
  434.         GA_TEXTEDITOR_Prop_Visible -- [..G], ULONG (OBSOLETE)
  435.  
  436.     FUNCTION
  437.         This value is the number of lines that currently fits in the window.
  438.         If you want a slider attached to the gadget you should create a
  439.         notify on this attribute.
  440.  
  441.     SEE ALSO
  442.         GA_TEXTEDITOR_Prop_Entries
  443.         GA_TEXTEDITOR_Prop_First, GA_TEXTEDITOR_Prop_DeltaFactor
  444.  
  445. texteditor.gadget/GA_TEXTEDITOR_Quiet
  446.  
  447.     NAME
  448.         GA_TEXTEDITOR_Quiet -- [ISG], BOOL
  449.  
  450.     FUNCTION
  451.         If you need to insert a lot of text "line by line" you should
  452.         set this tag to TRUE before starting, and then back to FALSE when you
  453.         are done adding text.
  454.  
  455.     SEE ALSO
  456.         GM_TEXTEDITOR_InsertText
  457.  
  458. texteditor.gadget/GA_TEXTEDITOR_ReadOnly
  459.  
  460.     NAME
  461.         GA_TEXTEDITOR_ReadOnly -- [ISG], BOOL
  462.  
  463.     FUNCTION
  464.         This tag is not supported in the Reaction version. Use GA_ReadOnly instead.
  465.  
  466.         In ReadOnly-mode there will be:
  467.         No cursor (but a normal TAB-frame).
  468.         TAB will activate the next gadget (instead of alt TAB).
  469.         The frame will be set to a ReadListFrame. (may change).
  470.         There is no ARexx support, except "Copy".
  471.  
  472.         The GA_TEXTEDITOR_StyleXXX tags are still useable.
  473.  
  474. texteditor.gadget/GA_TEXTEDITOR_RedoAvailable
  475.  
  476.     NAME
  477.         GA_TEXTEDITOR_RedoAvailable -- [..G], BOOL
  478.  
  479.     FUNCTION
  480.         This tag is set to TRUE when the user is able to redo his action(s)
  481.         (normally after an undo).
  482.         You can create a notify on this tag and let your redo button be
  483.         ghosted when there is nothing to redo.
  484.  
  485.     SEE ALSO
  486.         GA_TEXTEDITOR_UndoAvailable
  487.  
  488. texteditor.gadget/GA_TEXTEDITOR_Separator
  489.  
  490.     NAME
  491.         GA_TEXTEDITOR_Separator -- [.SG], UWORD *
  492.  
  493.     FUNCTION
  494.         Each line can act as a separator.
  495.  
  496.         A separator can be either thick or thin. It can be rendered over the
  497.         lines contents, or only on both sides of the contents. The placement
  498.         can be either top, middle or bottom.
  499.  
  500.         This tag reflects the current line. See gadgets/texteditor.h for
  501.         definitions.
  502.  
  503. texteditor.gadget/GA_TEXTEDITOR_StyleBold
  504.  
  505.     NAME
  506.         GA_TEXTEDITOR_StyleBold -- [.SG], BOOL
  507.  
  508.     FUNCTION
  509.         This tag shows whether the cursor or block is over bolded text or not.
  510.         You can set this tag to TRUE or FALSE if you want the style changed.
  511.  
  512.     SEE ALSO
  513.         GA_TEXTEDITOR_StyleItalic, GA_TEXTEDITOR_StyleUnderline
  514.  
  515. texteditor.gadget/GA_TEXTEDITOR_StyleItalic
  516.  
  517.     NAME
  518.         GA_TEXTEDITOR_StyleItalic -- [.SG], BOOL
  519.  
  520.     FUNCTION
  521.         This tag shows whether the cursor or block is over text in italics or
  522.         not.
  523.         You can set this tag to TRUE or FALSE if you want the style changed.
  524.  
  525.     EXAMPLE
  526.         see GA_TEXTEDITOR_StyleBold
  527.  
  528.     SEE ALSO
  529.         GA_TEXTEDITOR_StyleBold, GA_TEXTEDITOR_StyleUnderline
  530.  
  531. texteditor.gadget/GA_TEXTEDITOR_StyleUnderline
  532.  
  533.     NAME
  534.         GA_TEXTEDITOR_StyleUnderline -- [.SG], BOOL
  535.  
  536.     FUNCTION
  537.         This tag shows whether the cursor or block is over underlined text or
  538.         not.
  539.         You can set this tag to TRUE or FALSE if you want the style changed.
  540.  
  541.     EXAMPLE
  542.         see GA_TEXTEDITOR_StyleBold
  543.  
  544.     SEE ALSO
  545.         GA_TEXTEDITOR_StyleBold, GA_TEXTEDITOR_StyleItalic
  546.  
  547. texteditor.gadget/GA_TEXTEDITOR_TypeAndSpell
  548.  
  549.     NAME
  550.         GA_TEXTEDITOR_TypeAndSpell -- [.SG], BOOL
  551.  
  552.     FUNCTION
  553.         This is a shortcut to the Type'n'spell switch that the user can set
  554.         in the .mcp module.
  555.         Never integrate this into the settings of your preferences.
  556.  
  557. texteditor.gadget/GA_TEXTEDITOR_UndoAvailable
  558.  
  559.     NAME
  560.         GA_TEXTEDITOR_UndoAvailable -- [..G], BOOL
  561.  
  562.     FUNCTION
  563.         This tag is set to TRUE when the user is able to undo his action(s)
  564.         You can create a notify on this tag and let your undo button be
  565.         ghosted when there is nothing to undo.
  566.  
  567.     SEE ALSO
  568.         GA_TEXTEDITOR_RedoAvailable
  569.  
  570. texteditor.gadget/GA_TEXTEDITOR_WrapBorder
  571.  
  572.     NAME
  573.         GA_TEXTEDITOR_WrapBorder -- [ISG], ULONG
  574.  
  575.     FUNCTION
  576.         The gadget will insert a linebreak infront of the current word, if
  577.         the cursor comes beyond the column given here.
  578.  
  579.         Please remember that the gadget does realtime wordwrap which is much
  580.         better! This tag is for special cases!!!
  581.  
  582.     SEE ALSO
  583.         GA_TEXTEDITOR_ExportWrap, GA_TEXTEDITOR_ImportWrap
  584.  
  585. texteditor.gadget/GM_TEXTEDITOR_ARexxCmd
  586.  
  587.     NAME
  588.         GM_TEXTEDITOR_ARexxCmd
  589.  
  590.     SYNOPSIS
  591.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_ARexxCmd, NULL, STRPTR command);
  592.  
  593.     FUNCTION
  594.         If the user spends much of his time in the TextEditor gadget, then he
  595.         may want to have the gadgets functions integrated in the programs
  596.         arexx command set.
  597.         This can easily be done with this method, simply call it with the
  598.         command that the user has executed. If the method returns something
  599.         else than FALSE, then the command has been used by the gadget. If it
  600.         does return FALSE, then you should parse the command yourself.
  601.  
  602.         This method can also be used by you, to communicate with the gadget.
  603.  
  604.         The following commands are currently supported:
  605.  
  606.            CLEAR
  607.            CUT
  608.            COPY
  609.            PASTE
  610.            ERASE
  611.            GOTOLINE       Template: /N/A
  612.            GOTOCOLUMN     Template: /N/A
  613.            CURSOR         Template: Up/S,Down/S,Left/S,Right/S
  614.            LINE           Template: /N/A
  615.            COLUMN         Template: /N/A
  616.            NEXT           Template: Word/S,Sentence/S,Paragraph/S,Page/S
  617.            PREVIOUS       Template: Word/S,Sentence/S,Paragraph/S,Page/S
  618.            POSITION       Template: SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
  619.            SETBOOKMARK    Template: /N/A
  620.            GOTOBOOKMARK   Template: /N/A
  621.            TEXT           Template: /F
  622.            UNDO
  623.            REDO
  624.            GETLINE
  625.            GETCURSOR      Template: Line/S,Column/S
  626.            MARK           Template: On/S,Off/S
  627.            DELETE
  628.            BACKSPACE
  629.  
  630.     RESULT
  631.         The method will return FALSE if it couldn't use the command.
  632.         It will return TRUE if it did use the command, but the command didn't
  633.         give a result. It will return a pointer (STRPTR) when the command
  634.         gives a result, you should return this pointer to the user
  635.         (CreateArgString() it, and set it as the result, in the rexx message),
  636.         you must free the result yourself with FreeVec()
  637.  
  638. texteditor.gadget/GM_TEXTEDITOR_ClearText
  639.  
  640.     NAME
  641.         GM_TEXTEDITOR_ClearText
  642.  
  643.     SYNOPSIS
  644.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_ClearText, NULL);
  645.  
  646.     FUNCTION
  647.         This will clear all text in the gadget.
  648.  
  649. texteditor.gadget/GM_TEXTEDITOR_ExportBlock
  650.  
  651.     NAME
  652.         GM_TEXTEDITOR_ExportBlock
  653.  
  654.     SYNOPSIS
  655.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_ExportBlock, NULL);
  656.  
  657.     FUNCTION
  658.         Not yet implemented...
  659.  
  660.     RESULT
  661.  
  662.  
  663.     SEE ALSO
  664.         GM_TEXTEDITOR_InsertText, GM_TEXTEDITOR_ExportText
  665.  
  666. texteditor.gadget/GM_TEXTEDITOR_ExportText
  667.  
  668.     NAME
  669.         GM_TEXTEDITOR_ExportText
  670.  
  671.     SYNOPSIS
  672.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_ExportText, NULL);
  673.  
  674.     FUNCTION
  675.         This will export the text using the current exporthook.
  676.  
  677.     RESULT
  678.         This depends on the exporthook. The builtin hooks will return a
  679.         pointer to a null terminated buffer containing all the text. You must
  680.         free this buffer with FreeVec() when you are done using it.
  681.  
  682.     SEE ALSO
  683.         GM_TEXTEDITOR_InsertText, GM_TEXTEDITOR_ExportBlock
  684.  
  685. texteditor.gadget/GM_TEXTEDITOR_HandleError
  686.  
  687.     NAME
  688.         GM_TEXTEDITOR_HandleError
  689.  
  690.     SYNOPSIS
  691.         DoMethod(obj, win, req, GM_TEXTEDITOR_InsertText, ULONG errorcode);
  692.  
  693.     FUNCTION
  694.         This method is not supported by the editorgadget itself. The idea is
  695.         that you should subclass the gadget and implement your own error
  696.         handler. The handler should just bring up a requester or write the
  697.         error in a status line.
  698.  
  699.         The different errors are:
  700.  
  701.         Error_ClipboardIsEmpty:        The clipboard doesn't hold any data.
  702.         Error_ClipboardIsNotFTXT:      The clipboard doesn't hold any text.
  703.         Error_MacroBufferIsFull:       Not yet used.
  704.         Error_MemoryAllocationFailed:  Not yet used.
  705.         Error_NoAreaMarked:            The user has tried to copy or cut, but
  706.                                        hasn't marked anything.
  707.         Error_NoMacroDefined:          Not yet used.
  708.         Error_NothingToRedo:           There is nothing more to redo.
  709.         Error_NothingToUndo:           There is nothing more to undo.
  710.         Error_NotEnoughUndoMem:        The user has erased a block that is too
  711.                                        big to be saved. This results in a lost
  712.                                        undobuffer.
  713.         Error_StringNotFound:          Not yet used.
  714.  
  715.     RESULT
  716.         NONE
  717.  
  718. texteditor.gadget/GM_TEXTEDITOR_InsertText
  719.  
  720.     NAME
  721.         GM_TEXTEDITOR_InsertText
  722.  
  723.     SYNOPSIS
  724.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_InsertText, NULL, STRPTR text, LONG pos);
  725.  
  726.     FUNCTION
  727.         This will insert the given text using the current importhook.
  728.         The position of the inserted text can be:
  729.  
  730.           GV_TEXTEDITOR_InsertText_Cursor
  731.           GV_TEXTEDITOR_InsertText_Top
  732.           GV_TEXTEDITOR_InsertText_Bottom
  733.  
  734.     RESULT
  735.         NONE
  736.  
  737.     SEE ALSO
  738.         GM_TEXTEDITOR_ExportText
  739.  
  740. texteditor.gadget/GM_TEXTEDITOR_MacroBegin
  741.  
  742.     NAME
  743.         GM_TEXTEDITOR_MacroBegin
  744.  
  745.     SYNOPSIS
  746.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_MacroBegin, NULL);
  747.  
  748.     FUNCTION
  749.         Not yet implemented...
  750.  
  751.     RESULT
  752.  
  753.  
  754.     SEE ALSO
  755.         GM_TEXTEDITOR_MacroEnd, GM_TEXTEDITOR_MacroExecute
  756.  
  757. texteditor.gadget/GM_TEXTEDITOR_MacroEnd
  758.  
  759.     NAME
  760.         GM_TEXTEDITOR_MacroEnd
  761.  
  762.     SYNOPSIS
  763.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_MacroEnd, NULL);
  764.  
  765.     FUNCTION
  766.         Not yet implemented...
  767.  
  768.     RESULT
  769.  
  770.  
  771.     SEE ALSO
  772.         GM_TEXTEDITOR_MacroBegin, GM_TEXTEDITOR_MacroExecute
  773.  
  774. texteditor.gadget/GM_TEXTEDITOR_MacroExecute
  775.  
  776.     NAME
  777.         GM_TEXTEDITOR_MacroExecute
  778.  
  779.     SYNOPSIS
  780.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_MacroExecute, NULL);
  781.  
  782.     FUNCTION
  783.         Not yet implemented...
  784.  
  785.     RESULT
  786.  
  787.  
  788.     SEE ALSO
  789.         GM_TEXTEDITOR_MacroBegin, GM_TEXTEDITOR_MacroEnd
  790.  
  791. texteditor.gadget/GM_TEXTEDITOR_MarkText
  792.  
  793.     NAME
  794.         GM_TEXTEDITOR_MarkText
  795.  
  796.     SYNOPSIS
  797.         DoGadgetMethod(obj, win, req, GM_TEXTEDITOR_MarkText, NULL, ULONG start_x, ULONG start_y, ULONG stop_x, ULONG stop_y);
  798.  
  799.     FUNCTION
  800.         This method will mark the given area.
  801.  
  802.     RESULT
  803.         Not defined.
  804.  
  805. texteditor.gadget/OM_TEXTEDITOR_Replace
  806.  
  807.     NAME
  808.         OM_TEXTEDITOR_Replace
  809.  
  810.     SYNOPSIS
  811.         DoGadgetMethod(obj, win, req, OM_TEXTEDITOR_Replace, NULL, STRPTR newstring, ULONG flags);
  812.  
  813.     FUNCTION
  814.         This method replace the marked area with the string given.
  815.         Currently no flags are defined, so pass 0L for now.
  816.  
  817.     RESULT
  818.         TRUE if the string was replaced. A failure is likely to be because
  819.         nothing was marked when this method got invoked.
  820.  
  821. texteditor.gadget/GM_TEXTEDITOR_Search
  822.  
  823.     NAME
  824.         OM_TEXTEDITOR_Search
  825.  
  826.     SYNOPSIS
  827.         DoGadgetMethod(obj, win, req, OM_TEXTEDITOR_Search, NULL, STRPTR string, ULONG flags);
  828.  
  829.     FUNCTION
  830.         Searches the text for the given string. The string mustn't exceed 120
  831.         characters.
  832.  
  833.         Flags can be:
  834.  
  835.          GF_TEXTEDITOR_Search_FromTop
  836.           Normally the search starts at the cursor position - this flag will
  837.           make it start at the beginning of the text.
  838.  
  839.          GF_TEXTEDITOR_Search_CaseSensitive
  840.           If you want the search to be case sensitive, then set this flag.
  841.  
  842.     RESULT
  843.         TRUE if the string was found, otherwise FALSE.
  844.  
  845.     NOTE
  846.         If the string was found then it's left marked. So in case you want to
  847.         replace it, simply clear the marked string and insert the new one.
  848.  
  849.